package com.sy.mapper;

import com.sy.bean.GoodsWarehouse;
import com.sy.bean.SaveGoods;
import com.sy.bean.WarehouseGoods;
import com.sy.common.crud.IMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SaveGoodsMapper extends IMapper<SaveGoods> {

    /**
     * 根据商品id删除商品明细
     * @param id
     * @return
     */
    int deleteByGoodsId(int id);


    /**
     * 新增商品明细
     */
    int saveGoodsBatch(@Param("id") int id,@Param("warehouseGoodsList") List<WarehouseGoods> warehouseGoodsList);

    /**
     * 查询仓库
     * @param map 根据eid和商品名
     * @return 仓库id和名称
     */
    List<GoodsWarehouse> queryGoodsWarehouse(Map map);
}
